package de.velvettear.squirrel.gui;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import de.velvettear.squirrel.R;
import de.velvettear.squirrel.kernel.BruteForceReturn;
import de.velvettear.squirrel.kernel.Statics;

public class BruteForceResult extends Activity {
	
	private BruteForceReturn ret;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_bruteforceresult);
	    
	    if (getIntent().hasExtra(Statics.INTENT_BRUTEFORCERESULT)) {
	    	ret = (BruteForceReturn) getIntent().getParcelableExtra(Statics.INTENT_BRUTEFORCERESULT);
	    }
	    
	    TextView tv_message = (TextView) findViewById(R.id.bruteforceresult_tv_message_value);
	    tv_message.setText(ret.m_sMessage);
	    
	    TextView tv_count = (TextView) findViewById(R.id.bruteforceresult_tv_count_value);
	    tv_count.setText(ret.m_sCount);
	    
	    TextView tv_duration = (TextView) findViewById(R.id.bruteforceresult_tv_duration_value);
	    tv_duration.setText(ret.m_sDuration);
	    
	    TextView tv_result = (TextView) findViewById(R.id.bruteforceresult_tv_result_value);
	    tv_result.setText(ret.m_sPassword);
	    
	}

}
